Skip to content

Conversation

@hoovercj
Copy link
Member

Pull request checklist

Description of changes

Add clearButtonAriaLabel and clearButtonAriaDescription props to SearchBox.types.ts and pass them to the icon button in SearchBox.base.tsx

Focus areas to test

Ensure that passing the props result in the props being applied to the icon button and read to screen readers when the button has focus.

/**
* The aria description of the clear button for the SearchBox for the benefit of screen readers.
*/
clearButtonAriaDescription?: string;
Copy link
Collaborator

@manishgarg1 manishgarg1 Feb 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

we believe that these props be a part of the clearButtonProps property bag. That would make it easier to evolve the APIs.

clearButtonProps: {
ariaLabel;
ariaDescription:
} #Resolved

Copy link
Collaborator

@manishgarg1 manishgarg1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕐

@hoovercj hoovercj changed the title Add search box box for clear button aria attributes Add search box props for clear button aria attributes Feb 13, 2018
* The aria label of the clear button for the SearchBox for the benefit of screen readers.
*/
clearButtonAriaLabel?: string;

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to remove this. right ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

/**
* The props for the clear button.
*/
clearButtonProps?: ISearchBoxClearButtonProps;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should just be IButtonProps which should support whatever a button supports. That allows the caller to do things like put a data-automation-id on it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd considered that but thought I'd start with the conservative approach of whitelisting properties. Is this the last blocking issue?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To clarify: I will change this to ibuttonprops tomorrow, I'm just asking if there are other changes needed as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@manishgarg1 manishgarg1 merged commit 45f36cc into microsoft:master Feb 14, 2018
@hoovercj
Copy link
Member Author

Excellent, thanks @manishgarg1. What's the best way for us to know when changes like this and #3961 (if it is merged) are shipped? Is there a regular release schedule or some release tags or something to check?

@mikewheaton
Copy link
Contributor

@hoovercj I think releases are automated and come out roughly once a day. You can view the release log to see the latest, with notes on what's new.

@hoovercj
Copy link
Member Author

Oh excellent, exactly what I was looking for. Thanks @mikewheaton

@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Checkbox: should allow setting ariaLabel/ariaDescription to the clear button

4 participants